package com.ctshk.rpc.order.goods.mapper;

import com.ctshk.rpc.order.goods.base.CustomBaseMapper;
import com.ctshk.rpc.order.goods.entity.CommoditySpecificationsAttribute;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商品规格属性表 Mapper 接口
 * </p>
 *
 * @author 黄利斌
 * @since 2021-04-12
 */
public interface CommoditySpecificationsAttributeMapper extends CustomBaseMapper<CommoditySpecificationsAttribute> {

	/**
	 * 根据规格表id查询规格信息
	 * @param id
	 * @return
	 */
	@Select({
			"select `id`, `specifications_name_id`, `specifications_id`, `attribute_name`, `gmt_create`, `create_id`, `gmt_modified`, `modified_id`, `is_deleted` from `ctshk-goods`.`t_commodity_specifications_attribute` where specifications_id = #{id}"
	})
	List<CommoditySpecificationsAttribute> findBySpecificationsId(@Param("id") Long id);
}
